package com.skyline.jfs.namespace.model;

import java.util.Date;
import java.util.List;

import com.skyline.jfs.storage.model.JFSStorage;

public class JFSFile {
	
	private Long id;						//id
	private Long parent;					//父目录
	private String name;					//文件名称
	private String path;					//路径，记录下从根目录到这个文件的路径
	private Long size;					//文件大小
	private Integer replicNum; 				//复制数
	private List<JFSStorage> storage;			//存储，标识文件具体的存储位置
	private Date createdTime;				//创建时间
	private Boolean exist;					//存在位，标识这个目录是否还存在
	/*
	 * 权限：
	 * 
	 * 个位数：
	 * 		0：只读；只能读取文件，不能删除；
	 * 		1：读写；其实与只读是相同的；
	 * 		2：读写执行；可以删除；
	 */
	private Integer permission;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getParent() {
		return parent;
	}
	public void setParent(Long parent) {
		this.parent = parent;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public Long getSize() {
		return size;
	}
	public void setSize(Long size) {
		this.size = size;
	}
	public Integer getReplicNum() {
		return replicNum;
	}
	public void setReplicNum(Integer replicNum) {
		this.replicNum = replicNum;
	}
	public List<JFSStorage> getStorage() {
		return storage;
	}
	public void setStorage(List<JFSStorage> storage) {
		this.storage = storage;
	}
	public void addStorage(JFSStorage storage){
		this.storage.add(storage);
	}
	public Date getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}
	public Boolean getExist() {
		return exist;
	}
	public void setExist(Boolean exist) {
		this.exist = exist;
	}
	public Integer getPermission() {
		return permission;
	}
	public void setPermission(Integer permission) {
		this.permission = permission;
	}
	
}
